package cd826dong.cloud.zuul.filter;

import org.springframework.stereotype.Component;

import com.netflix.zuul.ZuulFilter;

@Component
public class GlobalPreFilter extends ZuulFilter {

	
	@Override
	public Object run() {
		System.out.println("GlobalPreFilter执行成功");
		return null;
	}

	@Override
	public boolean shouldFilter() {
		//对所有请求都执行过滤器
		return true;
	}

	@Override
	public int filterOrder() {
		// 值越小越早执行
		return 10;
	}

	@Override
	public String filterType() {
		return "pre";
	}

}
